package com.turing.domain;

import com.turing.utils.BaseEntity;

import java.io.Serializable;

/**
 * 二级分类#category_two
 * @TableName category_two
 */
public class CategoryTwo extends BaseEntity implements Serializable {
    /**
     * 二级分类主键#primary
     */
    private Integer ctwoId;

    /**
     * 一级分类#foreign#category_one=cone_id,cone_name
     */
    private Integer coneId;

    /**
     * 分类名称
     */
    private String ctwoName;

    /**
     * 分类序号
     */
    private Integer ctwoNum;

    /**
     * 分类代号
     */
    private String ctwoCode;

    /**
     * 分类说明
     */
    private String ctwoInfo;

    private static final long serialVersionUID = 1L;

    /**
     * 二级分类主键#primary
     */
    public Integer getCtwoId() {
        return ctwoId;
    }

    /**
     * 二级分类主键#primary
     */
    public void setCtwoId(Integer ctwoId) {
        this.ctwoId = ctwoId;
    }

    /**
     * 一级分类#foreign#category_one=cone_id,cone_name
     */
    public Integer getConeId() {
        return coneId;
    }

    /**
     * 一级分类#foreign#category_one=cone_id,cone_name
     */
    public void setConeId(Integer coneId) {
        this.coneId = coneId;
    }

    /**
     * 分类名称
     */
    public String getCtwoName() {
        return ctwoName;
    }

    /**
     * 分类名称
     */
    public void setCtwoName(String ctwoName) {
        this.ctwoName = ctwoName;
    }

    /**
     * 分类序号
     */
    public Integer getCtwoNum() {
        return ctwoNum;
    }

    /**
     * 分类序号
     */
    public void setCtwoNum(Integer ctwoNum) {
        this.ctwoNum = ctwoNum;
    }

    /**
     * 分类代号
     */
    public String getCtwoCode() {
        return ctwoCode;
    }

    /**
     * 分类代号
     */
    public void setCtwoCode(String ctwoCode) {
        this.ctwoCode = ctwoCode;
    }

    /**
     * 分类说明
     */
    public String getCtwoInfo() {
        return ctwoInfo;
    }

    /**
     * 分类说明
     */
    public void setCtwoInfo(String ctwoInfo) {
        this.ctwoInfo = ctwoInfo;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CategoryTwo other = (CategoryTwo) that;
        return (this.getCtwoId() == null ? other.getCtwoId() == null : this.getCtwoId().equals(other.getCtwoId()))
            && (this.getConeId() == null ? other.getConeId() == null : this.getConeId().equals(other.getConeId()))
            && (this.getCtwoName() == null ? other.getCtwoName() == null : this.getCtwoName().equals(other.getCtwoName()))
            && (this.getCtwoNum() == null ? other.getCtwoNum() == null : this.getCtwoNum().equals(other.getCtwoNum()))
            && (this.getCtwoCode() == null ? other.getCtwoCode() == null : this.getCtwoCode().equals(other.getCtwoCode()))
            && (this.getCtwoInfo() == null ? other.getCtwoInfo() == null : this.getCtwoInfo().equals(other.getCtwoInfo()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCtwoId() == null) ? 0 : getCtwoId().hashCode());
        result = prime * result + ((getConeId() == null) ? 0 : getConeId().hashCode());
        result = prime * result + ((getCtwoName() == null) ? 0 : getCtwoName().hashCode());
        result = prime * result + ((getCtwoNum() == null) ? 0 : getCtwoNum().hashCode());
        result = prime * result + ((getCtwoCode() == null) ? 0 : getCtwoCode().hashCode());
        result = prime * result + ((getCtwoInfo() == null) ? 0 : getCtwoInfo().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ctwoId=").append(ctwoId);
        sb.append(", coneId=").append(coneId);
        sb.append(", ctwoName=").append(ctwoName);
        sb.append(", ctwoNum=").append(ctwoNum);
        sb.append(", ctwoCode=").append(ctwoCode);
        sb.append(", ctwoInfo=").append(ctwoInfo);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}